Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send an option body with a POST request (enhanced) #21

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pablorodiz
Copy link

I was trying to use rg1220 changes to the original library so I could send a body in a post request, but I need additional headers and so I need to use beginRequest() and endRequest(). I noticed that in the rg1220 version body was not sent in these conditions because finishHeaders() was being called always with NULL as parameters from endRequest(). So I added two variables to store pointers to the body and content type char arrays so they can be used later in the case finishHeaders() is called later from outside startRequest.

Randy and others added 6 commits May 10, 2015 02:10
POST request functions now support sending a content type and a body
along with the request.
Fixed formatting. Tabs to spaces (fixing previous commit).
Added mechanism to store body and content type on startRequest so they can be sent on endRequest for complex http post operations which need additional headers
Waiting for 1 second when no data is available for reading is too much and makes the communication very slow. I have reduced it to 20 miliseconds.
…the library, but still waiting and parsing responses using the library. This is useful if you need to speed up communications by sending the whole request in only one packet, as is need if you want to communicate two ESP8266 devices without endless waiting for packet ACKs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant